<?php

namespace app\admin\controller\order;

use ShidianUtil\Thinkphp\Response\ApiResponse;
use ShidianUtil\Utils\CheckUtil;
use app\admin\model\UM as UM;
use app\admin\service\OptionsService;
use think\APP;
use think\Request as Request;

/**
 * Options 控制器
 * Class Options
 * @package app\admin\controller\order;
 * @link https://www.kancloud.cn/manual/thinkphp6_0/1037509
 * @see \app\admin\validate\order\Options
 */
class Options
{
    // 请求参数
    private Request $request;

    // service
    private OptionsService $service;

    public function __construct(Request $request, OptionsService $optionsService)
    {
        $this->request = $request;
        $this->service = $optionsService;
    }

    /**
     * 详情
     * @return ApiResponse
     * @url /order/options/read
     */
    public function read(): ApiResponse
    {
        return ApiResponse::success($this->service->orderOptions());
    }
}
